cmake_minimum_required(VERSION 3.12)
project(intercom)

set(CMAKE_CXX_STANDARD 14)

add_executable(intercom main.cpp peer.cc peer.h transport.cc transport.h server.cc server.h)

INCLUDE_DIRECTORIES(  /usr/local/Cellar/libgsm/1.0.18/include )
LINK_DIRECTORIES(  /usr/local/Cellar/libgsm/1.0.18/lib )

file(GLOB LIBRARIES "/usr/local/Cellar/libgsm/1.0.18/lib/*.dylib")
message("LIBRARIES = ${LIBRARIES}")

TARGET_LINK_LIBRARIES(intercom  ${LIBRARIES})

INCLUDE_DIRECTORIES(  /usr/local/Cellar/portaudio/19.6.0/include )
LINK_DIRECTORIES(  /usr/local/Cellar/portaudio/19.6.0/lib )

file(GLOB LIBRARIES "/usr/local/Cellar/portaudio/19.6.0/lib/*.dylib")
message("LIBRARIES = ${LIBRARIES}")

TARGET_LINK_LIBRARIES(intercom  ${LIBRARIES})